<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>数组的应用</title>
</head>
<body>
<script type="text/javascript">
    var str= "Hello,JavaScript,!";
    var arrStr= str.split(",");
    var outStr= arrStr.join("-");
    document.write("分割前："+ str +"<br/>");
    document.write("使用\"-\"重新连接后"+ outStr);
    </script>
</body>
</html>
